home *** CD-ROM | disk | FTP | other *** search
/ Champak 141 / (Vol 141) Oct 17 2011.iso / Games / Bratz_Yasmin.swf / scripts / DefineButton2_464 / BUTTONCONDACTION on(press).as next >
Encoding:
Text File  |  2011-10-17  |  586 b   |  18 lines

  1. on(press){
  2.    var dispcol = new Color(_parent.colourpicker.palette1);
  3.    r = r <= 255 ? (r >= 0 ? r : 0) : 255;
  4.    g = g <= 255 ? (g >= 0 ? g : 0) : 255;
  5.    b = b <= 255 ? (b >= 0 ? b : 0) : 255;
  6.    _root.colorstored = "0x" + (r >= 16 ? "" : "0") + r.toString(16) + (g >= 16 ? "" : "0") + g.toString(16) + (b >= 16 ? "" : "0") + b.toString(16);
  7.    dispcol.setRGB(_root.colorstored);
  8.    i = 1;
  9.    while(i <= 10)
  10.    {
  11.       var mycol = new Color(eval("_root.brush" + i));
  12.       _root.Open = "no";
  13.       mycol.setRGB(_root.colorstored);
  14.       delete my;
  15.       i++;
  16.    }
  17. }
  18.